import {createI18n} from 'vue-i18n'
import messages from 'src/lib/i18n/index'

const i18n = createI18n({
  locale: window.localStorage.getItem('lang')??'zh-CN',
  globalInjection: true,
  legacy: false,
  messages,
  fallbackLocale: 'zh-CN',
  silentFallbackWarn: true,
  silentTranslationWarn: true,
})

export default i18n
